function getBoxHtml(e)
{
    var t = "<ul>";
    for (var n in e) {
        t += "<li>" + e[n] + "</li>";
    }
    return t += "</ul>", t
}
function DY_scroll(e, t, n, r, i, s)
{
    var e = $(e), t = $(t), n = $(n), r = $(r).find("ul"), o = r.find("li").outerWidth(!0), u = i;
    n.click(function ()
    {
        r.animate({
            "margin-left" :- o
        },
        function ()
        {
            r.find("li").eq(0).appendTo(r), r.css({
                "margin-left" : 0
            })
        })
    }), t.click(function ()
    {
        r.find("li:last").prependTo(r), r.css({
            "margin-left" :- o
        }), r.animate({
            "margin-left" : 0
        })
    }), s == 1 && (ad = setInterval(function ()
    {
        n.click()
    },
    u * 1e3), e.hover(function ()
    {
        clearInterval(ad)
    },
    function ()
    {
        ad = setInterval(function ()
        {
            n.click()
        },
        u * 1e3)
    }))
}
$(function ()
{
    $("#flash").slidy({
        action : "click", animation : "fade", children : "li", menu :!0, pause :!0, speed : 500, time : 4e3
    }), DY_scroll(".ilist", ".ileft", ".iright", ".ilist", 5, 0);
    if ($("#topad").length > 0)
    {
        $("#topad").css("display", "block");
        var e = "http://demo.sdcms.cn/plug/api_ad.asp";
        jQuery.getScript(e, function ()
        {
            jQuery("#topad .api").html(getBoxHtml(api_data))
        })
    }
})